/*************************************************************************
	> File Name: P1202.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-02-13 15:50:30
 ************************************************************************/
#include <iostream>
using namespace std;

int month[13] = {
    0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};

int main() {
    int n, cnt_day = 0, week[7] = {0};
    cin >> n;
    for (int y = 1900; y < 1900 + n; y++) {
        int flag = 0;
        if ((y % 4 == 0 && y % 100) || y % 400 == 0) flag = 1;
        month[2] = 28 + flag;
        for (int m = 1; m <= 12; m++) {
            for (int d = 1; d <= month[m]; d++) {
                cnt_day++;
                if (d != 13) continue;
                week[cnt_day % 7] += 1;
            }
        }
    }
    for (int i = 1, j = 6; i <= 7; i++, j++) {
        printf("%d ", week[j % 7]);
    }
    cout << endl;
    return 0;
}
